# Author: perfectska04
# Theme: Murrine Compact for the murrine engine 0.53.1
# Description: Murrine Compact is 100% free and built with the aid of Colombian coffee and delicious cake.
# This theme is heavily influenced by Ubuntu and Clearlooks artwork. Most if not all the credit goes to them.
# You will always have permission to modify, release and distribute this theme as you see fit.. so share it with grandma, include it in your distro, make it better!

# Note: Uncommenting means to delete the "#" at the beginning of a line. Commenting out means to add a "#" at the beginning of a line. The "#" tells the theme wether to ignore the line or not.

# These are the official colors of the theme, you can change them in GNOME's appearance preferences.
gtk_color_scheme = "fg_color:#101010\nbg_color:#EDEDED\nbase_color:#fff\ntext_color:#1A1A1A\nselected_bg_color:#A0A0A0\nselected_fg_color:#1A1A1A\ntooltip_bg_color:#F5F5B5\ntooltip_fg_color:#000"

# This specifies the sizes of icons, you can comment this line out for larger buttons of fix any issue with panel-icon sizes.
gtk-icon-sizes = "panel=16,16 : gtk-menu=16,16 : gtk-button=16,16 : gtk-small-toolbar=16,16 : gtk-large-toolbar=16,16 : gtk-dialog=32,32 : gtk-dnd=16,16 : panel-menu=16,16"

# gtk-button-images = 0  # Enables or disables icons on gtk-buttons (OSX-like).
# gtk-menu-popup-delay = 0  # Makes menus pop up faster!

#include "panel.rc"  # This gives you gradient panel backgrounds. Comment out to get default gnome flat panels. Edit included panel.rc file for even more panel customization or to get dark panels!

style "theme-default"
{
	GtkButton      ::child-displacement-x = 0  # Pressed button icon displacement.
	GtkButton      ::child-displacement-y = 0#1  # Pressed button icon displacement.
	GtkButton      ::default-border       = { 0, 0, 0, 0 }
	GtkButtonBox   ::child_min_width      = 0
	GtkButtonBox   ::child_min_heigth     = 0
	GtkButtonBox   ::child_internal_pad_x = 0
	GtkButtonBox   ::child_internal_pad_y = 0

	GtkCheckButton ::indicator-size       = 12

	GtkPaned       ::handle-size          = 4

	GtkRange       ::trough-border        = 0  # Controls the spacing around scrollbars
	GtkRange       ::slider-width         = 11 # Controls the width of sliders, including scrollbars
	GtkRange       ::stepper-size         = 11#15
	GtkRange       ::stepper_spacing      = 0

	GtkScale       ::slider-length        = 25  # Length of sliders.
	GtkScale       ::trough-side-details  = 1
	GtkScrollbar   ::min-slider-length    = 25  # Min. length of scrollbars.

	GtkMenuBar     ::internal-padding     = 0
	GtkExpander    ::expander-size        = 10
	GtkToolbar     ::internal-padding     = 2
	GtkTreeView    ::expander-size        = 10
	#GtkTreeView    ::vertical-separator   = 1

	GtkMenu        ::horizontal-padding   = 0
	GtkMenu        ::vertical-padding     = 0
	GtkMenuItem    ::arrow-scaling        = 0.4 # Control size of the arrow in GtkMenu
	GtkMenuBar     ::internal-padding     = 0
	GtkOptionMenu  ::indicator_size       = 0
	GtkOptionMenu  ::indicator_spacing    = 0
	#GtkWidget      ::focus-line-width     = 0 # Width, in pixels, of the focus indicator line
	#GtkWidget      ::focus-padding	      = 0  # This gives you a more compact appearance.
  	GtkScrolledWindow ::scrollbar-spacing = 2#0  # This sets the spacing between scrollbars and windows next to them
  	
  	#GtkScrollbar::has-backward-stepper    = 0 # Displays an UP arrow at the TOP of scrollbar sliders
  	#GtkScrollbar::has-forward-stepper      = 1 # Displays a DOWN arrow at the BOTTOM of scrollbar sliders
  	#GtkScrollbar::has-secondary-backward-stepper	= 1 # Displays an UP arrow at the BOTTOM of scrollbar sliders
  	#GtkScrollbar::has-secondary-forward-stepper	= 0 # Displays a DOWN arrow at the TOP of scrollbar sliders

 	GtkToolbar::shadow-type       = GTK_SHADOW_NONE  # Makes toolbars flat and unified.

  	xthickness = 1
  	ythickness = 1

	fg[NORMAL]        = @fg_color
	fg[PRELIGHT]      = @fg_color
	fg[SELECTED]      = @selected_fg_color
	fg[ACTIVE]        = @fg_color
	fg[INSENSITIVE]   = darker (@bg_color)

	bg[NORMAL]        = @bg_color
	bg[PRELIGHT]      = shade (1.02, @bg_color)
	bg[SELECTED]	  = shade (1.30, @selected_bg_color)  # Color for selected items.
	bg[INSENSITIVE]   = @bg_color
	bg[ACTIVE]        = shade (0.90, @bg_color)

	base[NORMAL]      = @base_color
	base[PRELIGHT]    = shade (0.95, @bg_color)
	base[ACTIVE]      = shade (0.90, @bg_color)
	base[SELECTED]    = shade (1.30, @selected_bg_color)  # Color for selected base items.
	base[INSENSITIVE] = @bg_color

	text[NORMAL]      = @text_color
	text[PRELIGHT]    = @text_color
	text[ACTIVE]      = @selected_fg_color
	text[SELECTED]    = @selected_fg_color
	text[INSENSITIVE] = darker (@bg_color)

  engine "murrine" 
  {
		animation = TRUE  # FALSE disables progressbar animations.
		 #colorize_scrollbar  = TRUE
		#contrast = 1.0 #1.15 2.0
		#focus_color	= "#5D5D5D"#"#EDEDED"
		glazestyle = 0#3  # 0 = flat hilight, 1 = curved hilight, 2 = concave style, 3 = top curved hilight, 4 = beryl hilight
		 #glow_shade          = 2.0 # 0.0:0.1:2.0
    		 #glowstyle           = 3 # 0 = top glow, 1 = bottom glow, 2 = top and bottom glow, 3 = horizontal glow, 4 = centered glow
    		 #gradient_shades	= {1.25, 1.0, 1.0, 1.25}
                gradients = FALSE#TRUE
		highlight_shade = 1.05#0.95#0.94  # Sets the amount of buttons or widgets hilight. Lower means less gloss. 0.00:0.01:2.00
		 #lightborder_shade   = 2.0 # 0.00:0.01:2.00
    		 #lightborderstyle    = 1 # 0 = lightborder on top side, 1 = lightborder on all sides
		listviewheaderstyle = 0#1  # 0 = flat, 1 = glassy, 2 = raised
		listviewstyle = 0  # 0 = nothing, 1 = dotted
		menubaritemstyle = 0#1  # 0 = menuitem look, 1 = button look
		menubarstyle = 3#0  # 0 = flat, 1 = glassy, 2 = gradient, 3 = striped
		menuitemstyle = 1  # 0 = flat, 1 = glassy, 2 = striped
		menustyle = 0  # 0 = no vertical menu stripe, 1 = display vertical menu stripe
		 #profile             = MURRINE # MURRINE, NODOKA, MIST, CANDIDO, CLEARLOOKS
    		progressbarstyle    = 1 # 0 = nothing, 1 = striped, 2 = cells
	    	 #reliefstyle = 2 # 0 = flat, 1 = inset, 2 = shadow
	    	 #rgba = TRUE
		roundness = 0#2  # Overall roundness of the theme. 0:8
		scrollbar_color = "#A0A0A0"#"#E5E7E2"  # Commenting this out gives you non-colorful scrollbars.
		scrollbarstyle = 4#2  # 0 = nothing, 1 = circles, 2 = handles, 3 = diagonal stripes, 4 = diagonal stripes and handles, 5 = horizontal stripes, 6 = horizontal stripes and handles
		 #sliderstyle         = 0 # 0 = nothing, 1 = handles
    		stepperstyle        = 1 # 0 = classic, 1 = unified
    		 #toolbarstyle	= 1 # 0 = flat, 1 = glassy, 2 = gradient
   }
}

style "evolution-hack" = "theme-default"
{	
	bg[NORMAL]   = shade (1.02, @bg_color)  # Color for evo treeview headers.
	bg[PRELIGHT]   = shade (1.06, @bg_color)  # Color for evo treeview header prelight.
	bg[ACTIVE]	= shade (0.90, @bg_color)  # Color for unfocused evo selected items.
	bg[SELECTED]	= shade (1.30, @selected_bg_color)  # Color for evo selected items.
	fg[ACTIVE]      = @selected_fg_color
	fg[SELECTED]    = @selected_fg_color
}

style "theme-wide"
{
	bg[SELECTED]	  = @selected_bg_color  # Can't change, or clowns will eat you.
	xthickness = 1  # Can't change, or clowns will eat you.
	ythickness = 1  # Can't change, or clowns will eat you.
}

style "theme-wider"
{
	bg[SELECTED]	  = @selected_bg_color  # Can't change, or clowns will eat you.
	xthickness = 1  # Can't change, or clowns will eat you.
	ythickness = 1  # Can't change, or clowns will eat you.
}

# Entry
style "theme-entry" = "theme-wider"
{
	xthickness   = 3  # Can't change, or clowns will eat you.
	ythickness   = 3  # Can't change, or clowns will eat you.
  engine "murrine"
  {
    contrast = 1.2
  }
}

# Button
style "theme-button" = "theme-wider"
{
	xthickness   = 3  # Can't change, or clowns will eat you.
	ythickness   = 3  # Can't change, or clowns will eat you.
	bg[NORMAL]        = shade (1.02, @bg_color)  # Color of buttons.
	bg[PRELIGHT]      = shade (1.06, @bg_color)  # Color of prelighted buttons.
	bg[ACTIVE]        = shade (0.85, @bg_color)  # Color of pressed buttons.
	bg[INSENSITIVE]   = shade (0.95, @bg_color)  # Color of insensitive buttons.

  engine "murrine" 
  {
	contrast = 1.1  # Makes button borders darker.
}
}

# Notebook (tabs)
style "theme-notebook" = "theme-wide"
{
	xthickness = 2	# Controls tabs border wideness
	ythickness = 2	# Controls tabs border wideness
	bg[NORMAL] = shade (1.04, @bg_color)  # Tab backgrounds.
	bg[ACTIVE] = shade (0.96, @bg_color)  # Unfocused tab background.
}

# Tasklist
style "theme-tasklist" = "theme-wide"
{
	xthickness = 0
	ythickness = 0
}

# Menu
style "theme-menu" = "theme-wider"
{
	xthickness = 2	# Spacing around items in a list menu
	ythickness = 2	# Spacing around items in a list menu
	bg[NORMAL] = shade (1.05, @bg_color)  # Color of menu background.
  engine "murrine" 
  {
#	hilight_ratio = 0.92  # Gloss of menu-items.
	roundness = 0   # Roundness of menu-items.
}
}

# Menu-item
style "theme-menu-item" = "theme-wider"
{
	xthickness = 0	# Spacing menu items (menu buttons)
	ythickness = 2	# Spacing menu items (menu buttons)
	fg[PRELIGHT] = @selected_fg_color  # Color of selected menu item text.
	bg[SELECTED] = shade (1.20, @selected_bg_color)  # Color of menu items.
	bg[PRELIGHT] = shade (1.20, @selected_bg_color)  # Color of menu items.
}

style "theme-separator-menu-item"
{
	xthickness = 1	# Spacing around separator line in menus
	ythickness = 1	# Spacing around separator line in menus

#  Code for pixmap menu separators.
  engine "pixmap"
  {
    image
    {
      function	  = HLINE
      recolorable         = TRUE
      file	  = "Menu-Menubar/menu-line.png"
      border	  = { 1, 1, 1, 1 }
      stretch	  = TRUE
    }
}
}

# Treeview
style "theme-treeview"
{
}

style "theme-treeview-header" = "theme-default"
{
	xthickness = 0
	ythickness = 0
	bg[NORMAL]        = shade (1.02, @bg_color)  # Color of treeviews.
	bg[PRELIGHT]      = shade (1.06, @bg_color)  # Color of prelighted treeviews.
	bg[ACTIVE]        = shade (0.85, @bg_color)  # Color of pressed treeviews.
	bg[INSENSITIVE]   = shade (0.95, @bg_color)  # Color of insensitive treeviews.
  engine "murrine" 
  {
	glazestyle = 0  # Gloss style for treeview headers.
	roundness = 0  # Roundness for treeview headers. (Fix for evolution mail)
	highlight_shade = 0.92  # Gloss of treeview headers.
}
}

# Frame
style "theme-frame-title" = "theme-default"
{
	fg[NORMAL] = lighter (@fg_color)
}

# Tooltips
style "theme-tooltips" = "theme-wider"
{
  xthickness = 2
  ythickness = 2
	bg[NORMAL] = @tooltip_bg_color
	fg[NORMAL] = @tooltip_fg_color
}

# Progressbar
style "theme-progressbar" = "theme-wider"
{
  xthickness = 2  # Progressbar box spacing
  ythickness = 2  # Progressbar box spacing
	fg[PRELIGHT] = @selected_fg_color  # Progressbar prelighted text.
}

# Statusbar
style "theme-statusbar"
{
  ythickness = 1
  engine "murrine" 
  {
	#contrast = 1.0  # Makes statusbar line lighter.
}
}

# Combo box entry
style "theme-comboboxentry"
{
	xthickness   = 3  # Can't change, or clowns will eat you.
	ythickness   = 3  # Can't change, or clowns will eat you.
}

# Spinbutton
style "theme-spinbutton"
{
	xthickness   = 3  # Can't change, or clowns will eat you.
	ythickness   = 3  # Can't change, or clowns will eat you
	bg[NORMAL]        = shade (1.02, @bg_color)  # Color of spinbuttons.
	bg[PRELIGHT]      = shade (1.06, @bg_color)  # Color of prelighted spinbuttons.
	bg[ACTIVE]        = shade (0.85, @bg_color)  # Color of pressed spinbuttons.
	bg[INSENSITIVE]   = shade (0.95, @bg_color)  # Color of insensitive spinbuttons.
}

# Slider
style "theme-scale"
{
	bg[NORMAL]        = shade (1.02, @bg_color)  # Color of sliders.
	bg[PRELIGHT]      = shade (1.06, @bg_color)  # Color of prelighted sliders.
	bg[ACTIVE]        = shade (0.85, @bg_color)  # Color of pressed sliders.
	bg[INSENSITIVE]   = shade (0.95, @bg_color)  # Color of insensitive sliders.
}

# Horizontal slider
style "theme-hscale" = "theme-scale"
{
}

# Vertical slider
style "theme-vscale" = "theme-scale"
{
}

# Scrollbar
style "theme-scrollbar"
{
	bg[NORMAL]        = shade (1.02, @bg_color)  # Color of scrollbars.
	bg[PRELIGHT]      = shade (1.06, @bg_color)  # Color of prelighted scrollbars.?
	bg[ACTIVE]        = shade (0.85, @bg_color)  # Color of pressed scrollbars.
	bg[INSENSITIVE]   = shade (0.95, @bg_color)  # Color of insensitive scrollbars.
  engine "murrine" 
  {
#	hilight_ratio = 0.92  # Gloss of scrollbars.
	glazestyle = 0  # Gloss style of scrollbars.
	roundness = 0  # Scrollbar roundness.
}
}

# Horizontal scrollbar
style "theme-hscrollbar" = "theme-scrollbar"
{
}

# Vertical scrollbar
style "theme-vscrollbar" = "theme-scrollbar"
{
}

# Menubar
style "theme-menubar"
{
}

# Metacity frame
style "metacity-frame"
{
  bg[SELECTED]  = shade (0.90, @selected_bg_color)  # Color for metacity borders.
}

# Nautilus
style "theme-nautilus-location"
{
	bg[NORMAL] = shade (1.30, @selected_bg_color)  # Workaround for nautilus' messages.
}

# Check & Radio Buttons
style "theme-radiocheck" = "theme-default"
{
	text[PRELIGHT]	= @base_color  # Color for prelight of radio buttons.
}

class "GtkRadio*"	style "theme-radiocheck"
class "GtkCheck*"	style "theme-radiocheck"

#########################################
# Matches
#########################################

# theme default style is applied to every widget.
class "GtkWidget"    style "theme-default"

# Increase the x/ythickness in some widgets.
class "GtkToolbar"   style "theme-default" 
class "GtkRange"     style "theme-wide"
class "GtkFrame"     style "theme-wide"
class "GtkEntry"     style "theme-entry"
class "MetaFrames"   style "metacity-frame"
class "GtkSeparator" style "theme-wide"
class "GtkWindow"      style "metacity-frame"

class "GtkSpinButton"  style "theme-spinbutton"
class "GtkScale"       style "theme-scale"
class "GtkVScale"      style "theme-vscale"
class "GtkHScale"      style "theme-hscale"
class "GtkScrollbar"   style "theme-scrollbar"
class "GtkVScrollbar"  style "theme-vscrollbar"
class "GtkHScrollbar"  style "theme-hscrollbar"

# General matching following, the order is choosen so that the right styles override each other
# eg. progressbar needs to be more important then the menu match.

# This is not perfect, it could be done better
# (That is modify *every* widget in the notebook, and change those back that
# we really don't want changed)
widget_class "*<GtkNotebook>*<GtkEventBox>"     style "theme-notebook"
widget_class "*<GtkNotebook>*<GtkDrawingArea>"  style "theme-notebook"
widget_class "*<GtkNotebook>*<GtkLayout>"       style "theme-notebook"

widget_class "*<GtkButton>"      style "theme-button"
widget_class "*<GtkNotebook>"    style "theme-notebook"
widget_class "*<GtkStatusbar>*"  style "theme-statusbar"

widget_class "*<GtkComboBoxEntry>*" style "theme-comboboxentry"
widget_class "*<GtkCombo>*"         style "theme-comboboxentry"

widget_class "*<GtkMenuBar>*"           style "theme-menubar"
widget_class "*<GtkMenu>*"              style "theme-menu"
widget_class "*<GtkMenuItem>*"          style "theme-menu-item"
widget_class "*<GtkSeparatorMenuItem>*" style "theme-separator-menu-item"

widget_class "*.<GtkFrame>.<GtkLabel>" style "theme-frame-title"
widget_class "*.<GtkTreeView>*"        style "theme-treeview"

widget_class "*<GtkProgressBar>"       style "theme-progressbar"

# Treeview header
widget_class "*.<GtkTreeView>.<GtkButton>" style "theme-treeview-header"
widget_class "*.<GtkCTree>.<GtkButton>"    style "theme-treeview-header"
widget_class "*.<GtkList>.<GtkButton>"     style "theme-treeview-header"
widget_class "*.<GtkCList>.<GtkButton>"    style "theme-treeview-header"

# Workarounds for Evolution
widget_class "*.ETable.ECanvas"    style "theme-treeview-header"
widget_class "*.ETree.ECanvas"    style "theme-treeview-header"
widget_class "*GtkCTree*"	style "evolution-hack"
widget_class "*GtkList*"	style "evolution-hack"
widget_class "*GtkCList*"	style "evolution-hack"
widget_class "*.ETree.*"	style "evolution-hack"
widget_class "*EInfoLabel*"	style "evolution-hack"

# The window of the tooltip is called "gtk-tooltip"
################################
# FIXME:
# This will not work if one embeds eg. a button into the tooltip.
# As far as I can tell right now we will need to rework the theme
# quite a bit to get this working correctly.
# (It will involve setting different priorities, etc.)
################################
widget "gtk-tooltip*" style "theme-tooltips"

###################################################
# Special cases and work arounds
###################################################

# Special case the nautilus-extra-view-widget
# ToDo: A more generic approach for all applications that have a widget like this.
widget "*.nautilus-extra-view-widget" style : highest "theme-nautilus-location"

# Work around for http://bugzilla.gnome.org/show_bug.cgi?id=382646
# Note that the work around assumes that the combobox is _not_ in
# appears-as-list mode.
# Similar hack also in the menuitem style.
# This style does not affect GtkComboBoxEntry, it does have an effect
# on comboboxes in appears-as-list mode though.
style "theme-text-is-fg-color-workaround"
{
	text[NORMAL]      = @fg_color
	text[PRELIGHT]    = @fg_color
	text[SELECTED]    = @selected_fg_color
	text[ACTIVE]      = @fg_color
	text[INSENSITIVE] = darker (@bg_color)
}
widget_class "*.<GtkComboBox>.<GtkCellView>"   style "theme-text-is-fg-color-workaround"

style "theme-menuitem-text-is-fg-color-workaround"
{
	text[NORMAL]        = @fg_color
	text[PRELIGHT]      = @selected_fg_color
	text[SELECTED]      = @selected_fg_color
	text[ACTIVE]        = @fg_color
	text[INSENSITIVE]   = darker (@bg_color)
}
widget "*.gtk-combobox-popup-menu.*"   style "theme-menuitem-text-is-fg-color-workaround"

# Work around the usage of GtkLabel inside GtkListItems to display text.
# This breaks because the label is shown on a background that is based on the
# base color set.
style "theme-fg-is-text-color-workaround"
{
	fg[NORMAL]      = @text_color
	fg[PRELIGHT]    = @text_color
	fg[ACTIVE]      = @selected_fg_color
	fg[SELECTED]    = @selected_fg_color
	fg[INSENSITIVE] = darker (@bg_color)
}
widget_class "*<GtkListItem>*" style "theme-fg-is-text-color-workaround"
# The same problem also exists for GtkCList and GtkCTree
# Only match GtkCList and not the parent widgets, because that would also change the headers.
widget_class "*<GtkCList>" style "theme-fg-is-text-color-workaround"

# My workarounds (Specific to this theme):
widget_class "*.GtkNotebook.*.GtkViewport" style "theme-notebook"  # Fixes some tab backgrounds.

# The answer to the ultimate question of life, the universe, and everything is 42.

# Things Rick Astley would never do:
# Give you up.
# Let you down.
# Run around and desert you.
# Make you cry.
# Say goodbye.
# Tell a lie and hurt you.
